package chapter04;
class Animal2{
    void shout(){
        System.out.println("动物发出叫声");
    }
}
class Dog2 extends Animal{
    void shout(){
        System.out.println("汪汪汪......");
    }
}
public class example3 {
    public static void main(String[] args) {
        Dog2 dog = new Dog2();
        dog.shout();
    }
}